# nums = [6, 5, 8, 9, 1]
# x = filter(lambda m: m % 2 == 0, nums)
# m = map(lambda fx: fx + 1, x)
# print(list(m))
#
#
# n=int(input())
# def fibonacci(n):
#     if n == 1 or n == 2:
#       return 1
#     return fibonacci(n - 2) + fibonacci(n - 1)
# print(fibonacci(n))
# #递归容易有堆栈的溢出  一般能用遍历 迭代就不用递归。
# #filter为过滤 map可将其中可迭代参数挨个取出并进行相对运算。
#
#
# from functools import reduce
# def foo(x,y):
#     return x+y
# print(reduce(foo,nums))


# sort 字典用法测试
# person=[
#     {'name':'zhangsan','age':21,'height':180},
#     {'name':'lisi','age':20,'height':175}]
# def foo(x):
#     return x['age']
# person.sort(key=foo)
# print(person)


# for in 循环结束后 才执行else

# for i in [1,2,3,4]:
#     print(i)
# else:
#     print(i,"else")


# a=[]
# a[0:]=map(int,input().split())
# print(a)
# 对列表a传参


# 递归测试
# def fact(x):
#     if x==1:
#         return 1
#     else:
#         return  x*fact(x-1)
#
# print(fact(4))
# 4*3*2*1
# for i in range(10,0,-1):#仍然左闭右开    [ )
#   print(i)
# a=[0,1,2,3,4,5,6,7,8]
# print(a[-1])

# lst1=[ [ 8,5,4] [0,5,1]]
# for i in lst1:
#     print(*i)
#     #这里运用python特殊解包  i 必须是可迭代对象仍支持切片且左闭右开。
# 注意 lst1中只能有可迭代对象 否则报错。

# q=['1','2','3','4','5','6','7','8','9']
# print(q[-0::])
# print(q[0:(len(q)-3)])
# print(q[-3])





